<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">

	<p:dialog id="donHangDialogId" header="Chi tiết đơn hàng" widgetVar="donHangDialog" showEffect="fade"
		hideEffect="fade" resizable="true" modal="true" appendToBody="true" maximizable="true" width="500px">
		<h:form id="donHangDetailFormId">
			<p:messages autoUpdate="true" />
			<h:panelGrid id="banPanelGridId" columns="2" cellpadding="4">
				<p:outputLabel value="Mã số" style="font-weight:bold" />
				<p:outputLabel value="#{donHangView.editedEntity.code}" />

				<p:outputLabel value="Tg đặt hàng" style="font-weight:bold" />
				<p:outputLabel value="#{donHangView.editedEntity.thoiGianDatHang}" />

				<p:outputLabel value="Tg thanh toán" style="font-weight:bold" />
				<p:outputLabel value="#{donHangView.editedEntity.thoiGianThanhToan}" />

				<p:outputLabel value="Trạng thái" style="font-weight:bold" />
				<p:outputLabel value="#{donHangView.editedEntity.trangThai}" />
			</h:panelGrid>
			<p:dataTable scrollable="true" scrollHeight="150" value="#{donHangView.editedEntity.chiTietDonHangs}"
				var="chiTietDonHang">

				<f:facet name="header">Chi tiết đơn hàng</f:facet>

				<p:column width="150" headerText="Name">
					<h:outputText value="#{chiTietDonHang.sanPham.name}" />
				</p:column>

				<p:column width="50" headerText="Số lượng">
					<h:outputText value="#{chiTietDonHang.soLuong}" />
				</p:column>

				<p:column width="50" headerText="Đơn giá">
					<h:outputText value="#{chiTietDonHang.donGia}" />
				</p:column>

				<p:column width="50" headerText="Thành tiền">
					<h:outputText value="#{chiTietDonHang.soLuong * chiTietDonHang.donGia}" />
				</p:column>

				<f:facet name="footer">
						Footer
				</f:facet>
			</p:dataTable>
		</h:form>
	</p:dialog>

</ui:composition>